import request from '@/utils/request'

//保险信息详情
export function getInsuranceMessage(query) {
  return request({
    url: '/car/insurance/recordList',
    method: 'get',
    params: query
  })
}

//购置税信息
export function getPurchaseMessage(query) {
  return request({
    url: `/car/prchaseTax/getByCarId/${query}`,
    method: 'get',
  })
}


// 查询维修列表
export function getRepairMessage(data) {
  return request({
    url: `/car/carMaintenance/getCarMaintenanceInfo`,
    method: 'post',
    data
  })
}

// 查询保养列表
export function getMaintenanceMessage(query) {
  return request({
    url: `/car/carMaintain/getCarMaintainInfo/${query}`,
    method: 'get',
  })
}

// 查询年检信息
export function getInspectionMessage(query) {
  return request({
    url: `/car/carInspection/recordList/`,
    method: 'get',
    params: query
  })
}

// 查询更换轮胎
export function getChangeWheelMessage(query) {
  return request({
    url: `/car/carReplaceTyre/getCarReplaceTyre/${query}`,
    method: 'get',
  })
}


// 查询违章
export function getViolationMessage(query) {
  return request({
    url: '/carViolation/queryCarViolationRecord/' + carId,
    method: 'get'
  })
}

//查询GPS列表
export function getGpsMessage(query) {
  return request({
    url: `/gps/carGpsManagement/list`,
    method: 'get',
    params: query
  })
}

// 根据车辆id查询最近一次的出库信息vehicle-delivery
export function getVehicleDeliveryMessage(query) {
  return request({
    url: `/outStorage/getInfoByCarId/${query}`,
    method: 'get',
  })
}

//根据车架号获取订单信息  合同订单
export function getContractMessage(query) {
  return request({
    url: `/car/carBasic/findOrderInfoByCarId/${query}`,
    method: 'get',
  })
}

//storage根据车辆id查询最近一次的入库信息
export function getVehicleStorageMessage(query) {
  return request({
    url: `/inStorage/getInfoByCarId/${query}`,
    method: 'get',
  })
}

//查询订单还车列表
export function getReturnStorageMessage(query) {
  return request({
    url: `/returnCar/orderReturn/listForCar`,
    method: 'get',
    params: query
  })
}

